package hxs;

#if flash
import flash.media.Microphone;
import hxs.events.flash.media.MicrophoneEvents;
import flash.net.FileReference;
import flash.net.FileReferenceList;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.net.URLStream;
import flash.net.XMLSocket;
import flash.net.Socket;

import hxs.events.flash.net.FileReferenceEvents;
import hxs.events.flash.net.FileReferenceListEvents;
import hxs.events.flash.net.NetConnectionEvents;
import hxs.events.flash.net.URLStreamEvents;
import hxs.events.flash.net.XMLSocketEvents;
import hxs.events.flash.net.SocketEvents;
import hxs.events.flash.net.NetStreamEvents;
#end

import flash.display.InteractiveObject;
import flash.display.LoaderInfo;
import flash.display.Stage;
import flash.media.Sound;
import flash.media.SoundChannel;


import flash.display.DisplayObject;
import flash.net.SharedObject;

import flash.net.URLLoader;
import flash.text.TextField;
import flash.utils.Timer;
import hxs.events.flash.media.SoundChannelEvents;
import hxs.events.flash.media.SoundEvents;
import hxs.events.flash.net.SharedObjectEvents;
import hxs.events.flash.net.URLLoaderEvents;
import hxs.events.flash.text.TextfieldEvents;
import hxs.events.flash.utils.TimerEvents;

import hxs.events.flash.display.DisplayObjectEvents;
import hxs.events.flash.display.InteractiveObjectEvents;
import hxs.events.flash.display.LoaderInfoEvents;
import hxs.events.flash.display.StageEvents;


import hxs.extras.FlashEventsStore;

/**
 * ...
 * @author Tony Polinelli
 */

class Shortcuts {
	public static function getEvents(target):Dynamic
	{
		return cast FlashEventsStore.getEvents(target);
	}
}

class InteractiveObjectShortcuts {
	public inline static function events(target:InteractiveObject):InteractiveObjectEvents { return cast(FlashEventsStore.getEvents(target),InteractiveObjectEvents); }
}
class DisplayObjectShortcuts {
	public inline static function events(target:DisplayObject):DisplayObjectEvents { return cast(FlashEventsStore.getEvents(target),DisplayObjectEvents);  }
}
class StageShortcuts {
	public inline static function events(target:Stage):StageEvents { return cast(FlashEventsStore.getEvents(target),StageEvents);  }
}
class LoaderInfoShortcuts {
	public inline static function events(target:LoaderInfo):LoaderInfoEvents { return cast(FlashEventsStore.getEvents(target),LoaderInfoEvents);  }
}
class SoundChannelShortcuts {	
	public inline static function events(target:SoundChannel):SoundChannelEvents { return cast(FlashEventsStore.getEvents(target),SoundChannelEvents); }
}
class SoundShortcuts {	
	public inline static function events(target:Sound):SoundEvents { return cast(FlashEventsStore.getEvents(target),SoundEvents); }
}
class TextFieldShortcuts {	
	public inline static function events(target:TextField):TextfieldEvents { return cast(FlashEventsStore.getEvents(target),TextfieldEvents); }
}
class TimerShortcuts {	
	public inline static function events(target:Timer):TimerEvents { return cast(FlashEventsStore.getEvents(target),TimerEvents); }
}
class URLLoaderShortcuts {	
	public inline static function events(target:URLLoader):URLLoaderEvents { return cast(FlashEventsStore.getEvents(target),URLLoaderEvents); }
}
class SharedObjectShortcuts {	
	public inline static function events(target:SharedObject):SharedObjectEvents { return cast(FlashEventsStore.getEvents(target),SharedObjectEvents); }
}

#if (flash && !nme_limit)

class MicrophoneShortcuts {
	public inline static function events(target:Microphone):MicrophoneEvents { return cast(FlashEventsStore.getEvents(target),MicrophoneEvents); }
}

class FileReferenceShortcuts {
	public inline static function events(target:FileReference):FileReferenceEvents { return cast(FlashEventsStore.getEvents(target),FileReferenceEvents); }
}
class FileReferenceListShortcuts {	
	public inline static function events(target:FileReferenceList):FileReferenceListEvents { return cast(FlashEventsStore.getEvents(target),FileReferenceListEvents); }
}
class NetConnectionShortcuts {	
	public inline static function events(target:NetConnection):NetConnectionEvents { return cast(FlashEventsStore.getEvents(target),NetConnectionEvents); }
}
class NetStreamShortcuts {	
	public inline static function events(target:NetStream):NetStreamEvents { return cast(FlashEventsStore.getEvents(target),NetStreamEvents); }
}
class SocketShortcuts {	
	public inline static function events(target:Socket):SocketEvents { return cast(FlashEventsStore.getEvents(target),SocketEvents); }
}
class URLStreamShortcuts {	
	public inline static function events(target:URLStream):URLStreamEvents { return cast(FlashEventsStore.getEvents(target),URLStreamEvents); }
}
class XMLSocketShortcuts {	
	public inline static function events(target:XMLSocket):XMLSocketEvents { return cast(FlashEventsStore.getEvents(target),XMLSocketEvents); }
}

#end
